-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Cubewcs mosaic and dask reproject #894
base: master
Are you sure you want to change the base?
WIP: Cubewcs mosaic and dask reproject #894
Conversation
5bc5a6c
to
cca08dc
Compare
spectral_cube/cube_utils.py
Outdated
if specw1.wcs.cdelt == 1.0: | ||
raise NotImplementedError("Spectral WCS doesn't have a CDELT parameter; we don't know how to deal with this generally.") | ||
if np.sign(specw1.wcs.cdelt) == 1: | ||
new_crval3 = ranges.min().to(u.Hz).value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in the same spectral unit?
new_crval3 = ranges.min().to(u.Hz).value | |
new_crval3 = ranges.min().value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRVAL has to be in Hz - astropy wcs (wcslib) will force it to be if it isn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the case, or only is when the spectral axis is already in freq. If it's velocity, the default is to m/s.
I added a couple commits that restructure this part to ensure it inherits the appropriate default WCS spectral unit (and this fixed our existing mosaic tests in this PR for me).
5290d36
to
bbb71a1
Compare
89dbd56
to
26a1aba
Compare
WIP / stash
add missing import
import import
…(but it doesn't work right yet)
… add a lot of verbosity
…d CRVAL fixed while increasing NAXIS adds a bunch of useless blank pixels
26a1aba
to
c636655
Compare
This is associated with astropy/reproject#351 and enables cube mosaicing with memory mapping. It might also work with astropy/reproject#388, but that's unclear.